-
Notifications
You must be signed in to change notification settings - Fork 379
Updated DesktopOsHelper.IsMac to work properly on net10 + macOS 26 #5541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Updated DesktopOsHelper.IsMac to work properly on net10 + macOS 26 #5541
Conversation
|
@fengga - smth for you to review |
|
Hey @bgavrilMS / @fengga , any chance of a review here 🙂 ? |
|
This is still broken BTW, and net10 is GA now |
|
This is a real thing blocking me from updating a project to .NET 10. For what it's worth, here are some values from my machine: Log.Debug("Platform: {OsVersionPlatform}", Environment.OSVersion.Platform);
Log.Debug("OSDescription: {OsDescription}", RuntimeInformation.OSDescription);
Log.Debug("Is OSX: {IsOsPlatform}", RuntimeInformation.IsOSPlatform(OSPlatform.OSX));(so I think you could either look for the string "macOS" (as in this PR) or call For comparison, here are the values from .NET 9: Update: the problem isn't specific to MacOS 26! It also happens with .NET 10 on earlier OS versions: |
src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/DesktopOsHelper.cs
Outdated
Show resolved
Hide resolved
fengga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
Changes proposed in this request
Before .NET 10,
RuntimeInformation.OSDescriptioncalledunameon *nix systems to populate itself. Now it uses a nicer way using the .NET runtime target information, that means that field no longer containsDarwin, soIsMacalways returned false. This simply lets that method check formacOsas well.Testing
I couldn't find any unit tests for this class.
Performance impact
None